﻿using System;
using System.Diagnostics.Contracts;
using blackhouse.WebNemo.Business.Groups;
using System.IO;

namespace blackhouse.WebNemo.Business.AutomaticInstalation {
    internal class GroupConfiguration {

        #region Fields

        private readonly IGroup group;
        private readonly FileInfo groupFile;

        #endregion

        #region Properties

        public bool LocalFileExist {
            get {
                return this.groupFile.Exists;
            }
        }

        #endregion

        #region Constructors

        public GroupConfiguration(IGroup group, FileInfo file) {
            this.group = group;
            this.groupFile = file;
        }

        public GroupConfiguration(IGroup group, string path) {
            this.group = group;
            this.groupFile = new FileInfo(path + @"\" + group.Id + "-" + group.SystemName + ".xml");
        }

        #endregion

        #region Methods

        internal void CreateFile() {
            this.groupFile.Create().Close();
        }

        internal void SynchronizeToFile() {
            
        }

        #endregion

    }
}
